home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
comm
/
fido
/
login_034.lzh
/
login.man
< prev
next >
Wrap
Text File
|
1993-02-18
|
16KB
|
397 lines
Exerpt from Welmat Users Manual Login V0.20
1mLogin
0mThe LOGIN program for use with Welmat
By Russell W. McOrmond.
No warrantee expressed or implied.
Free Software Foundation Copyleft applies.
All rights reserved
-1-
Exerpt from Welmat Users Manual Login V0.20
1mBBS and other Logins
0mWelmat currently uses two different ways to allow a
Bulletin Board to be ran when Welmat answers the phone. In
this mode, Welmat would be considered a Front End mailer,
and acts as a negotiater to determin whether the caller
wishes to use Fidonet, or whether it is a caller that wishes
to use the BBS. Each method requires two keywords: One to
turn the function on, and another to set up it's
parameters. These keywords are all part of the modem
configuration section (IE: They are placed between the
Modem/ModemEnd keywords) and are specific to a specific
line. Please also note that one could very easily use both
methods at the same time, ulthough if you have the LOGIN set
up, it would be easiest to just have the BBS set up as one
of the accounts for the LOGIN.
The first method is the most familiar method. When a
user calls, he can be instructed to hit his <ESCAPE> key
twice to enter the BBS. If this is the method that you wish
to use, you would enter the following keywords:
YesBBS
BBSExecute <Command to run>
YesBBS is a flag that lets welmat know that you wish
to use the BBSExecute command, and wish welmat to check
for the 3mescape 0mkey to be pressed. The escape key must be
hit twice consecutively (IE: No other keys in between) for
this action to be taken. This avoids possible problems
with line noise. The BBSExecute keyword sets up the
command that will be run when the user types in the escape
key. Many different '%' style substitutions are possible,
and these are all outlines in the section 'SmartRun' as
they are common to the entire of Welmat. With the
BBSExecute, Welmat will automatically hang up on the
caller and wait for the next call. Here is an example:
YesBBS
BBSExecute "bbs -B%B -b%b -d%d -u%u"
This would execute "BBS -B<Modem-Modem Baud>
-b<computer-Modem baud> -d<device> -u<unit>" when the user
hits the escape key. This is the method used by quite a
few BBS's.
Remember that this is line specific. If you are
running your BBS on more than one phone line, you will
want to specify eithor the line number, or the device and
unit for the particular line. If you run a multi-line
Welmat system, but run a single-line BBS it is your own
responsibility to make sure that things only run on a
single line.
-2-
Exerpt from Welmat Users Manual Login V0.20
The second way to deal with callers would be to use
the Unix-Like GETTY function of Welmat. Under unix, there
is a command called 'Getty' (Get TTY) which will basically
answer an incoming call, send them a simple banner, and
collect a single line of input. This line of text would
then be sent to a program called 'Login'. The login
command would then ask for a password (If required) and
eithor allow the user access to the system, or return back
to the GETTY to have the user type in their user name
again. Since the Login program can return more than once,
the existance of a carrier, or a return result code of 0
is used to determin whether Welmat should wait for another
call, or should present the caller with the banner. It is
then partly the responsibility of the Login program to
hang up after a successful call.
Welmat has a function that does exactly the same
thing, and I myself have implemented a login program that
is a derivative of the 'GETTY' program that was supplied
with Matt Dillon's UUCP package. After answering the
call, Welmat will be listening for characters to be
received from the Modem. If a YoHoo (Fidonet) or TSYNCH
(FTS-0001 session) is received, it will do a session with
the mailer. If an Escape is received, and YesBBS is
active, the BBS will be ran. All other printable
characters are accepted, and put into a Line buffer. When
the user then hits return, Welmat will then run the Login
command, and one of the arguments will be this line of
input that the user had typed in. Here would be an
example of the commands required:
WelcomeMessage "\r\nAmigaTronix Line 1\r\nTHERE IS NO
BBS HERE!\r\nDo not Login:"
Login "uucp:c/login -asdg -D%d -U%u \"%s\""
YesLogin
As you can see, the WelcomeMessage includes the text 'ogin:'
which is the standard text that any UUCP site would be
looking for (Please read the documentation on Send-Expect
scripts in the UUCP documentation). After the line has been
accepted (The user hit return) the Login command would be
run. The login command currently takes 1 required argument
(The user name) and also has a few optional keywords.
-1mA0m[1msdg0m] is used if you are using an ASDG duel serial
board. This keyword is required as the Login program must
be able to hang up after a caller is finished. If this
keyword is not included, it is assumes that the system is
using the serial.device and will handle the internal DTR
directly.
-1mb0m[1maud0m] is used if you wish to pass the Modem<-->Modem
baud rate to login. This is used for the '%B' substitution
within command lines in the password file.
-3-
Exerpt from Welmat Users Manual Login V0.20
-1mL0m[1mower0m] is used to force all the login names typed to
lower case. This is required if you wish to have the login
names case-insensitive. One would then have all the login
names in lower case in the password file. Please note that
the passwords themselves are still case sensitive.
-1mD0m<1mdevice0m> is used to specify the device. The default
is "serial.device".
-1mU0m<1munit0m> is used to specify the unit number. The
default is unit 0.
-1mO0m<1mlog path0m> is used to specify the output LogFile
name. Under AmigaUUCP this would normally be
UUSPOOL:LOGFILE. The default is unit login.log in the
current directory.
-1mP0m<1mpasswd path0m> is used to specify the pathname of the
password file. Under AmigaUUCP this would normally be
UULIB:PASSWD. The default is PASSWD in the current
directory.
The only required parameter is the single line of text
that the user typed in as it was accepted by Welmat. In my
example, I use quotation marks since the user might have
typed a space in his user name. As you will also notice,
the quotation marks have to be preceeded by a Slash '\'
character. This is because a quotation within the config
file would normally end the string. Since we want 1mWcompile
0mto actually include the quotation mark, we must escape the
special meaning of those quotes.
As mentioned, the Login program is a direct derivative
of the Getty program supplied with the Amiga UUCP. There are
some very small differences in the 1muulib0m:1mpasswd 0mfile from
the released information. The file has the following form:
User ,Password ,Uid ,GroupId ,(Finger-Info) ,Home-Dir
,Command-To-Run
1mUser 0muser name, up to 8 characters. With the current
version of Login, if you are running AmigaDos 2.0, the
User field may contain an AmigaDos pattern (Just like
with Filenames).
1mPassword 0mpassword, up to 8 characters (uncrypted for
now). A password of '*' means that no password will be
prompted for. A password of '**' would cause the
password to be asked for, but not actually checked (For
use for things like Anonymous Logins/etc).
1mUid 0munique numerical id (don't use 0 please), this WILL be
used by some programs to find password entries. Give
each entry a different UID.
-4-
Exerpt from Welmat Users Manual Login V0.20
1mGroupId 0mnot currently used, set to 2 (don't use 0).
1mFinger 0mFinger information (your name). Future sub fields
within the finger information will be separated by
colons (:).
1mHome0m-1mDir 0mDirectory from which to run the command
1mCommand 0mCommand to run. Command is run with arguments you
specify plus:
-GETTY -DEVICE devicename -UNIT unitname
Where the devicename and unitname together make up a
serial port which the command should use for further
communications. stdin and stdout are set to NULL:, as
is the console handler.
If you place a few special characters in front of
the Command-To-Run, special things will happen.
If command-to-run is prefaced with a '*' Login
will open the UUSER: device for stdin and stdout and a
read-timeout of 1 second. The UUSER: handler is
supplied with Amiga UUCP.
If you preface the command with a '$' , the Login
will not hang up on the caller after the command
returns.
If a '<' is used, the command is taken to be the
filename of a text file to display to the user.
If you preface the command with a '#' , Login
will NOT do any re-direction, and will just send the
command line exactly as it is given in the Password
file. This mode is included to allow BBS users to
create their own command line that might be
in-compatable with ones automatically created.
Please note that any combination of the above
special characters can be used.
1mSpecial Command0m-1mLine Substitutions0m.
Login supports substituting various information
anywhere in the command string to allow one to create
their own command lines. All the substitutions are
specified by using a '%' followed by a character. The
following subsitutions are currently supported:
%b - Baudrate of connection (Modem<-->Computer).
%B - Baudrate of caller (Modem<-->Modem).
%l - Login Name (What the user typed).
%f - Serial Flags.
%p - Password typed in by user.
%s - Serial Device (EG: serial.device).
-5-
Exerpt from Welmat Users Manual Login V0.20
%u - Unit number.
Here are a few example entries:
# Put any comment here
#
# User,Password,Uid,GroupId,Finger-Info,Home-Dir,
ommand-To-Run
info,*,100,3,Display Info File,ram:,<uulib:Info-Text
; This will display a text file to the user.
user,*,105,3,USER Login,uucp:pub/,$*uucp:c/rshell Unknown
0
; this would allow the user to log into the Restricted
Shell.
bye,*,106,3,exit,ram:,*uucp:empty
; This would just hang up on the caller (uucp:empty is an
empty script)
bbs,*,1,3,BBS,bbs:,#bbs:c/MyFancyBBS %b -DEVICE %d -UNIT
%u
TransAmiga,*,69,69,(TransAmiga BBS),SYS:,#TA:TransAmiga
Trans.Config %b
TransFast,*,69,69,(TransAmiga w/ LOCK),SYS:,#TA:TransAmiga
Trans.Config %B %b
;
; TA:TransAmiga Trans.Config 38400 2400
; ^^^^^ ^^^^
; serial real
uujulie,mikepass,204,3,UUCP-JULIE,ram:,uucp:c/u cico
; this would allow Julie to log in to do a uucp session.
#? #?,*,2,3,Firstname Lastname,uulib:,<SpaceInName
; *AmigaDos 2.0 Only* this would display the text file
"uulib:spaceinname" if a username with at least one space
character was typed.
test,*,100,100,(test),c:,#echo >t:a "baud=%b %B ser=%s
unit=%u flag=%f Name=%l Pas=%p"
test1,**,100,100,(test),c:,#echo >t:a "baud=%b %B ser=%s
unit=%u flag=%f Name=%l Pas=%p"
Again, for full documentation on the Amiga UUCP
package, please consult the documentation supplied with
these packages. The use of the Login command is not
limited to just UUCP itself. One could very easily set
up an 'account' called BBS that would run the BBS. It
could also very easily set up more than one BBS package
at the same time, and allow the users to choose which
BBS they wish to log into.
Notes: Login uses a few handlers that should be
mentioned. A handler called 'NULL:' (Different from
NIL:) must be mounted (This handler is available from
1:163/109 as 'NULL.ZOO'), and if you wish to use the
'*' special character for the command, you must have
the 'UUSER:' handler mounted.(In the future this will
make use of the FIFO: and fifo.library instead.)
-6-